Skip to content

[Plan] 링크 기반 계획 공유 & UK 검증#171

Merged
Creamcheesepie merged 7 commits into
mainfrom
feat/#106
Dec 23, 2025
Merged

[Plan] 링크 기반 계획 공유 & UK 검증#171
Creamcheesepie merged 7 commits into
mainfrom
feat/#106

Conversation

@kms152000
Copy link
Copy Markdown
Collaborator

@kms152000 kms152000 commented Dec 22, 2025

🔗 관련 이슈

#106
Close #106

🚀 PR 개요

  • 특정 사용자가 참가자로 포함된 모든 Plan 조회 시 schedules 컬렉션은 제외
  • PlanParticipant UK 검증을 service에서도 추가적으로 검증
  • UUID를 활용한 계획 공유 링크 기능 작업

📌 변경 사항

  • 기능 추가
  • 버그 수정
  • 리팩터링
  • 문서 업데이트
  • 테스트 추가/수정

🧪 테스트 방법

변경된 내용을 어떻게 테스트했는지 구체적으로 적어주세요.

  1. Postman

📸 스크린샷 (선택)

image image image image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 22, 2025

Test Results

6 tests  ±0   6 ✅ ±0   0s ⏱️ -1s
3 suites ±0   0 💤 ±0 
3 files   ±0   0 ❌ ±0 

Results for commit 9ca3f6d. ± Comparison against base commit cd03fe9.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 22, 2025

⭐ JaCoCo Coverage

Line Coverage: 6.72%

📄 Coverage Details

Overall Line Coverage: 6.68% (189 covered / 2830 lines)

Package Summary (lowest first)
Package Line % Covered Missed
com/back/web7_9_codecrete_be/domain/chats/controller 0.00% 0 2
com/back/web7_9_codecrete_be/domain/chats/service 0.00% 0 38
com/back/web7_9_codecrete_be/domain/plans/controller 0.00% 0 49
com/back/web7_9_codecrete_be/domain/location/controller 0.00% 0 14
com/back/web7_9_codecrete_be/global/rsData 0.00% 0 11
com/back/web7_9_codecrete_be/domain/chats/entity 0.00% 0 4
com/back/web7_9_codecrete_be/domain/location/entity 0.00% 0 15
com/back/web7_9_codecrete_be/global/scheduler 0.00% 0 3
com/back/web7_9_codecrete_be/domain/auth/entity 0.00% 0 0
com/back/web7_9_codecrete_be/domain/auth/service 0.00% 0 136
com/back/web7_9_codecrete_be/domain/plans/service 0.00% 0 362
com/back/web7_9_codecrete_be/global/initData 0.00% 0 51
com/back/web7_9_codecrete_be/domain/users/controller 0.00% 0 26
com/back/web7_9_codecrete_be/domain/email/entity 0.00% 0 6
com/back/web7_9_codecrete_be/domain/auth/controller 0.00% 0 24
com/back/web7_9_codecrete_be/domain/artists/controller 0.00% 0 27
com/back/web7_9_codecrete_be/global/aspect 0.00% 0 4
com/back/web7_9_codecrete_be/global/wikidata 0.36% 1 279
com/back/web7_9_codecrete_be/domain/artists/service 0.76% 3 390
com/back/web7_9_codecrete_be/domain/users/service 0.97% 1 102
com/back/web7_9_codecrete_be/global/musicbrainz 0.99% 1 100
com/back/web7_9_codecrete_be/domain/email/service 1.61% 1 61
com/back/web7_9_codecrete_be/domain/concerts/entity 3.33% 3 87
com/back/web7_9_codecrete_be/domain/concerts/controller 3.45% 1 28
com/back/web7_9_codecrete_be/global/storage 3.57% 2 54
com/back/web7_9_codecrete_be/domain/concerts/service 5.12% 24 445
com/back/web7_9_codecrete_be/domain/artists/entity 8.33% 4 44
com/back/web7_9_codecrete_be/global/rq 10.87% 5 41
com/back/web7_9_codecrete_be/domain/users/util 14.29% 1 6
com/back/web7_9_codecrete_be/domain/plans/entity 21.88% 21 75
com/back/web7_9_codecrete_be/domain/users/entity 23.08% 12 40
com/back/web7_9_codecrete_be/global/security 27.62% 29 76
com/back/web7_9_codecrete_be/global/spotify 35.71% 5 9
com/back/web7_9_codecrete_be/domain/location/service 64.44% 58 32
com/back/web7_9_codecrete_be/global/doc 100.00% 17 0
Lowest Covered Classes (Top 20)
Class Line % Covered Missed
com.back.web7_9_codecrete_be.domain.plans.service.PlanService 0.00% 0 362
com.back.web7_9_codecrete_be.domain.artists.service.ArtistService 0.00% 0 78
com.back.web7_9_codecrete_be.domain.auth.service.AuthService 0.00% 0 73
com.back.web7_9_codecrete_be.domain.concerts.service.ConcertService 0.00% 0 63
com.back.web7_9_codecrete_be.global.initData.BaseInitData 0.00% 0 51
com.back.web7_9_codecrete_be.domain.plans.controller.PlanController 0.00% 0 49
com.back.web7_9_codecrete_be.domain.concerts.entity.Concert 0.00% 0 40
com.back.web7_9_codecrete_be.domain.plans.entity.Schedule 0.00% 0 37
com.back.web7_9_codecrete_be.global.security.JwtTokenProvider 0.00% 0 37
com.back.web7_9_codecrete_be.domain.users.entity.User 0.00% 0 31
com.back.web7_9_codecrete_be.domain.artists.entity.Artist 0.00% 0 31
com.back.web7_9_codecrete_be.domain.location.service.LocationService 0.00% 0 30
com.back.web7_9_codecrete_be.domain.concerts.entity.ConcertPlace 0.00% 0 29
com.back.web7_9_codecrete_be.domain.chats.service.ChatPolicyService 0.00% 0 27
com.back.web7_9_codecrete_be.domain.plans.entity.Plan 0.00% 0 27
com.back.web7_9_codecrete_be.domain.auth.service.TokenService 0.00% 0 27
com.back.web7_9_codecrete_be.domain.artists.controller.ArtistsController 0.00% 0 27
com.back.web7_9_codecrete_be.domain.users.controller.UserController 0.00% 0 26
com.back.web7_9_codecrete_be.domain.auth.controller.AuthController 0.00% 0 24
com.back.web7_9_codecrete_be.global.storage.S3FileStorageService 0.00% 0 23
Changed Classes (from this PR)
Source (PR) Class Prefix Line % Covered Missed
src/main/java/com/back/web7_9_codecrete_be/domain/plans/service/PlanService.java com.back.web7_9_codecrete_be.domain.plans.service.PlanService 0.00% 0 362
src/main/java/com/back/web7_9_codecrete_be/domain/plans/controller/PlanController.java com.back.web7_9_codecrete_be.domain.plans.controller.PlanController 0.00% 0 49
src/main/java/com/back/web7_9_codecrete_be/domain/plans/dto/response/PlanShareLinkResponse.java com.back.web7_9_codecrete_be.domain.plans.dto.response.PlanShareLinkResponse 0.00% 0 0
src/main/java/com/back/web7_9_codecrete_be/domain/plans/repository/PlanParticipantRepository.java com.back.web7_9_codecrete_be.domain.plans.repository.PlanParticipantRepository 0.00% 0 0
src/main/java/com/back/web7_9_codecrete_be/domain/plans/repository/PlanRepository.java com.back.web7_9_codecrete_be.domain.plans.repository.PlanRepository 0.00% 0 0
src/main/java/com/back/web7_9_codecrete_be/global/error/code/PlanErrorCode.java com.back.web7_9_codecrete_be.global.error.code.PlanErrorCode 0.00% 0 0
src/main/java/com/back/web7_9_codecrete_be/domain/plans/entity/Plan.java com.back.web7_9_codecrete_be.domain.plans.entity.Plan 22.45% 11 38

🔗 Full HTML report: See artifact jacoco-full-html on this run → https://github.com/prgrms-web-devcourse-final-project/WEB7_9_codecrete_BE/actions/runs/20439472128

@kms152000 kms152000 changed the title Feat/#106 [Plan] 링크 기반 계획 공유 & UK 검증 Dec 22, 2025
@kms152000 kms152000 self-assigned this Dec 22, 2025
@kms152000 kms152000 added Bug Something isn't working Feature labels Dec 22, 2025
Copy link
Copy Markdown
Collaborator

@Creamcheesepie Creamcheesepie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~

private String shareToken;

@Schema(description = "공유 링크", example = "/plans/share/550e8400-e29b-41d4-a716-446655440000")
private String shareLink;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UUID 쓰신 것은 좋아 보이는데, 너무 길어서 조금만 줄이시면 좋을 것 같습니다!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UUID 쓰신 것은 좋아 보이는데, 너무 길어서 조금만 줄이시면 좋을 것 같습니다!

바로 반영하겠습니다!

// DB 레벨에서 이미 참가자인지 확인 (유니크 제약조건 검증)
boolean isAlreadyParticipant = planParticipantRepository.existsByUser_IdAndPlan_PlanId(
user.getId(), plan.getPlanId());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exist로 검증한 부분이 좋네요

user.getId(), plan.getPlanId());

if (isAlreadyParticipant) {
// 이미 참가자인 경우 상태를 ACCEPTED로 변경
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추후 계획 수락부분에서 변경하시려고 Join에서 accepted로 설정하게 해두신건가요...?

Copy link
Copy Markdown
Collaborator Author

@kms152000 kms152000 Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추후 계획 수락부분에서 변경하시려고 Join에서 accepted로 설정하게 해두신건가요...?

아.. PENDING이 맞는데 초반 설계 단계에서 급하게 하느라 지나갔네요ㅎㅎ 조언 감사합니다!~
수락 기능도 있어서 링크 클릭 시 조회하는 것으로 하겠습니다.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아래에 계획 수락 부분이 있었는데 accepted라서 당황했어요 ㅋㅋㅋㅋㅋ 혹시 다른 로직에서 검증한다고 일부러 accepted 해두신줄 알았습니다

Copy link
Copy Markdown
Collaborator

@larama-C larama-C left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

공유링크 관리 하는 부분만 리팩토링 해주시면 될 것 같습니다!

@Creamcheesepie Creamcheesepie merged commit 5596fb6 into main Dec 23, 2025
2 checks passed
@Creamcheesepie Creamcheesepie deleted the feat/#106 branch December 23, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Plan] 플랜 공유 기능 구현 & uk 조건을 서비스에서도 검증

4 participants